home *** CD-ROM | disk | FTP | other *** search
- Path: news.nstn.ca!news
- From: nstn181a@fox.nstn.ca (Pierre G. Boutquin)
- Newsgroups: comp.lang.c++
- Subject: Re: Q:order of evaluation
- Date: Tue, 16 Jan 96 23:36:06 -0400
- Organization: Nova Scotia Technology Network
- Message-ID: <4dhuip$1t0@news.nstn.ca>
- NNTP-Posting-Host: toronto-ts-01.nstn.ca
-
- In <4dggjv$vs6@navet.enator.se>, Enator A/S writes:
- >The precedence dominates over the grouping, so the grouping is only used
- >when the precedence of the operators are the same. () has the highest
- >precedence, so (i+=1) is evaluated first.
- >
- >Hardy, ENATOR
- >
-
- Nope.
-
- I believe C++ is no different than ANSI C in this respect. The order
- of evaluation is only guaranteed:
- 1. At the _end_ of a full expression;
- 2. After the first operand of &&, ||, ?: and the , operator;
- 3. After evaluation of all function arguments and function expression
- in a function call.
-
- L8R!
-
- Pierre.
-